package urbanview.src;

import serverCommunication.controller.WebClientInterface;
import serverCommunication.model.User;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        User user = WebClientInterface.readUser(1);
        Log.d("Log", user.toString());
        Toast.makeText(this, user.toString(), Toast.LENGTH_LONG);
//        try {
//			Socket socket = new Socket("localhost", 9090);
//			PrintWriter printWriter = new PrintWriter(socket.getOutputStream(), true);
//			printWriter.write("Bugabuga!");
//			Toast.makeText(getBaseContext(), "works", Toast.LENGTH_LONG);
//			
//		} catch (Exception e) {
//			Log.d("LOG", e.getMessage());
//			Toast.makeText(getBaseContext(), e.getMessage(), Toast.LENGTH_LONG);
//		}
    }
}